package com.trumeen.immichgallery

import android.app.Application
import com.trumeen.immichgallery.network.RetrofitClient
import com.trumeen.immichgallery.repository.AuthManager
import dagger.hilt.android.HiltAndroidApp
import javax.inject.Inject

@HiltAndroidApp
class MainApplication : Application() {

    @Inject
    lateinit var authManager: AuthManager

    companion object {
        // 提供静态访问方法
        lateinit var instance: MainApplication
            private set
    }

    override fun onCreate() {
        super.onCreate()
        instance = this

        // 初始化 RetrofitClient
        RetrofitClient.initialize(authManager)
    }
}